/**
 *  高风险作业管理模块 api
 *  @module api/user
 */
import axios from '@/utils/axios.js'
const API_HOST = ''

/**
 * 我的待办任务分页
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const gettaskList = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/todoPage'
})

/**
 * 获取表单详情信息根据流程实例id
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getformData = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/formData/getDataByInstanceId'
})

/**
 * 审批流程
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const completeTask = (data) => axios({
	method: 'post',
	data: data,
	url: API_HOST + '/task/complete'
})

/**
 * 获取审批历史流转xml图信息
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getflowXmlAndNode = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/flowXmlAndNode'
})

/**
 * 获取审批历史流转记录
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getflowRecord = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/flowRecord'
})

/**
 * 我的已办任务分页
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getfinishedList = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/finishedList'
})

/**
 * 作业申请管理分页
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getactivepage = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/process/definition/active/page'
})

/**
 * 高风险作业申请添加接口
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getapplyInfoadd = (data) => axios({
	method: 'post',
	data: data,
	url: API_HOST + '/highRiskWork/applyInfo/add'
})

/**
 * 我发起的流程实例分页
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getmyProcess = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/myProcess'
})

/**
 * 取消已经启动的流程
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getstopProcess = (data) => axios({
	method: 'post',
	data: data,
	url: API_HOST + '/task/stopProcess'
})

/**
 * 删除已经启动的流程
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getprocessInstance = (data) => axios({
	method: 'post',
	data: data,
	url: API_HOST + '/processInstance/delete'
})

/**
 * 抄送我的流程信息分页
 * @param {object} [data] 发送键值对数据
 * @returns {promise}
 */
export const getmyCopyInfopage = (data) => axios({
	method: 'get',
	data: data,
	url: API_HOST + '/task/myCopyInfopage'
})